/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Client;

import java.io.*;


/**
 *
 * @author benjamin
 */
class DisplayJDBOutput extends Thread{
    
        BufferedReader stdInput;
        OutputStream os;
       PrintWriter Displayed;

	public DisplayJDBOutput(InputStream In){
		stdInput = new BufferedReader(new InputStreamReader(In));
                Displayed = new PrintWriter(os);
	}

	public void run(){
               System.out.println("Le thread de lecture est lancé");
               String s;
               try{
                     while ((s = stdInput.readLine()) != null) {
                            System.out.println("Ligne recue");
                            System.out.println(s);
                            this.Displayed.print(s);
                        }
		}catch(Exception e){
                         this.Displayed.print("Error, Not possible to read any  line.");
			e.printStackTrace();	
		}


	}



}
